<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>{block name='title'}KE 后台管理{/block}</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/element-ui/2.0.7/theme-chalk/index.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="{Ke:assets file='css/common.css'}">
    <link rel="stylesheet" href="{Ke:assets file='css/frame.css'}">
    {block name='head'}{/block}
</head>
<body>
{Ke:seturl name='logout' link='auth/logout'}
{Ke:seturl name='login' link='auth/login'}
{Ke:seturl name='adminEditPass' link='auth/pass'}
{Ke:seturl name='clearCache,lockScreen'}
<div id="app" v-cloak>
    <transition name="el-zoom-in-top">
        <div class="k-lock" v-show="data.isLock">
            <div class="k-unlock">
                <p style="margin:10px;">系统已锁定</p>
                <input type="password" v-model="unlockPass" placeholder="验证登录密码">
                <a class="k-unlock-btn" @click="lockScreen(0)">
                    <i :class="iconFormat('unlock')"></i>
                </a>
            </div>
        </div>
    </transition>
	<div class="header" v-if="menulist">
		<div class="title">KE 后台管理</div>
		<ul class="nav">
			<li v-for="(item,index) in menulist" @click="onTopNav(index)">{{ item.title }}</li>
		</ul>
        <div class="pull-right">
            <el-dropdown trigger="click" class="right-nav" style="margin-right: 15px;"
                 @command="onCommand">
              <span class="el-dropdown-link" style="color:#f3f3f3">
                {{ admin.user }}&nbsp;<i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="editpass">修改密码</el-dropdown-item>
                <el-dropdown-item command="logout">退出登录</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
        </div>
        <div class="pull-right">
            <div class="k-header-right-btn">
                <a @click="lockScreen(1)" title="锁定"><i :class="iconFormat('lock')"></i></a>
                <a @click="clearCache" title="清除缓存"><i :class="iconFormat('paint-brush')"></i></a>
            </div>
        </div>
	</div>
    <div class="sidebar" v-if="menulist">
        <div class="title"><i :class="iconFormat('bars')"></i>&nbsp;菜单导航</div>
        <ul v-if="menulist[curr].children">
            <li v-for="item in menulist[curr].children" @click="onSidebar(item)"><i :class="iconFormat(item.icon)"></i>&nbsp;{{ item.title }}</li>
        </ul>
    </div>
    <div class="body">
	{block name='body'}{/block}
    </div>
</div>
<script src="//cdn.bootcss.com/vue/2.5.9/{$Think.VUE}"></script>
<script src="//cdn.bootcss.com/element-ui/2.0.7/index.js"></script>
<script src="{Ke:assets file='js/ke.js' module='false'}"></script>
{Ke:init var='data,menulist,curr'}
</body>
</html>